package com.itheima;

import java.util.Scanner;

public class Fun {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入月数:");
        int month=sc.nextInt();
        int count=fun(month);
        System.out.println("第"+month+"数字为:");
        System.out.println(count);

    }

    private static int fun(int month) {
        if(month==1||month==2){
            return 1;
        }else{
            return fun(month-1)+fun(month-2);
        }
    }
}
